<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Notice/index')}">院部新闻管理</a></li>
        <li class="active"><a href="{:url('Notice/add')}">添加院部新闻</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Notice/addPost')}">
        <div class="form-group">
            <label for="input-title" class="col-sm-2 control-label">标题<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-title" name="title">
            </div>
        </div>

        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label">封面<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input id="photo-1" type="hidden" name="image" >
                <input id="input-image" type="text" name="photo_name" title="图片名称" disabled readonly>
                <div style="margin-top: 10px">
                    <img id="photo-1-preview" style="width: 150px" >
                </div>
                <div style="margin-top: 15px">
                    <a class="btn btn-primary" href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="input-author" class="col-sm-2 control-label">作者<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-author" name="author">
            </div>
        </div>
        <div class="form-group">
            <label for="input-abstract" class="col-sm-2 control-label">摘要<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <textarea class="form-control" name="abstract" id="input-abstract" rows="4" cols="82" ></textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="content" class="col-sm-2 control-label"><span class="form-required">*</span>内容</label>
            <div class="col-md-6 col-sm-12">
                <script type="text/plain" id="content" name="content"></script>
                <span style="color: #ffb752;"></span>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">添加</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
</body>
</html>
